<template>
	<view>
		<up-tabbar
			:value="curTab"
			@change="handleChange"
			:fixed="true"
			:placeholder="false"
			:safeAreaInsetBottom="false"
		>
			<up-tabbar-item name="/pages/index/index" text="首页" icon="home"></up-tabbar-item>
			<up-tabbar-item name="/pages/order/order" text="订单" icon="photo"></up-tabbar-item>
			<up-tabbar-item name="/pages/my/my" text="我的" icon="account"></up-tabbar-item>
		</up-tabbar>
	</view>
</template>

<script setup>
import { ref } from 'vue';
	const curTab = ref('/pages/index/index')
	// const pages = getCurrentPages()
	// const curRoute = pages[pages.length - 1]
	// const curPath = '/' + curRoute.route
	// value.value = curPath
	const handleChange = (res) => {
		console.log(res)
		uni.navigateTo({
			url: res
		})
	}
</script>

<style>

</style>